package com.hs.srm.admin.modules.pricemanagement.service;

import com.baomidou.mybatisplus.service.IService;
import com.hs.srm.admin.modules.pricemanagement.entity.EssentialInformationEntity;
import com.hs.srm.admin.modules.pricemanagement.entity.InquiryQuotationEntity;
import com.hs.srm.admin.modules.pricemanagement.vo.EssentialInformationVO;
import com.hs.srm.common.utils.PageUtils;

import java.util.List;
import java.util.Map;

/**
 * @author yanfei
 * @date 2019年5月23日
 */
public interface EssentialInformationService extends IService<EssentialInformationEntity> {
    boolean insertEssntiaInfo(EssentialInformationEntity essentialInformationEntity);

    /**
     * 根据供应商,工厂,物料号查询
     */
    EssentialInformationEntity findByNo(String vendorCode, String factory, String materialCode, String classify);

    /**
     * 根据供应商,工厂，物料号更新
     */
    void update(String vendorCode, String factory, String materialCode, String quotationId);

    /**
     * 新增信息记录维护
     */
    boolean insertInquiryQuoToEssntiaInfo(InquiryQuotationEntity inquiryQuotationEntity);

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 有配额要做的查询
     */
    List<EssentialInformationVO> findByNos(String factory, String materialCode, String pkId);

    /**
     * 没有配额时要做的查询
     */
    List<EssentialInformationVO> simplfindByNos(String factory, String materialCode, String pkId);


    List<EssentialInformationVO> findByEssentialInforma(String factory, String materialCode);

    public PageUtils selectDetailPage(Map<String, Object> params);


    //根据供应商编码和itemID查找数据
    EssentialInformationVO findByCodeItemId(String sgId, String itemId);
}
